package com.sanyang.lawyer.service.Audit;

import com.sanyang.lawyer.ResultApi.ResponseResult;
import com.sanyang.lawyer.entity.Audit;
import com.sanyang.lawyer.entity.Audit_type;
import com.sanyang.lawyer.entity.Case_audit;
import com.sanyang.lawyer.mapper.audit.Audit_closeLawMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.Date;

@Service
public class Audit_closeLawService {

    @Autowired
    private Audit_closeLawMapper lawMapper;
    
    
    //审核表中添加数据   流程id，提交人，提交备注，    类型id，提交时间。审核状态。
    public void insertCloseOne(Case_audit case_audit){
        Audit audit = case_audit.getAuditid();
        
        Audit_type type = new Audit_type();
        type.setTypeid(4);
        
        audit.setSubmitTime(new Date());
        audit.setState("未审核");
        audit.setTypeid(type);
        lawMapper.insertCloseOne(audit);
    }
    
    
    //案件和审核表中间表添加数据 案件id，审核id。
    public void insertCase_auditOne(Case_audit case_audit){
        lawMapper.insertCase_auditOne(case_audit);
    }


    //案件审核
    public void completeProcess(Audit audit){
        lawMapper.completeProcess(audit);
    }
    
    
    
}
